package com.android.stockme.frontend;

import com.android.stockme.backend.IBackendController;
import com.android.stockme.backend.configuration.IConfigurationChangedListener;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;


public class SettingsAdapter extends BaseAdapter {

	private Context context = null;
	private IBackendController backend = null;

	public SettingsAdapter(final IBackendController backend, Context context) {
		this.backend = backend;
		this.context = context;
		
		this.backend.getConfigurationManager().registerFinanceWebsiteChangedListener(new IConfigurationChangedListener() {
			public void notifyConfigurationChanged(Object arg) {
				notifyDataSetChanged();
			}			
		});		
		this.backend.getConfigurationManager().registerHistoryLengthChangedListener(new IConfigurationChangedListener() {
			public void notifyConfigurationChanged(Object arg) {
				notifyDataSetChanged();
			}			
		});
		this.backend.getConfigurationManager().registerNewsTickFrequencyChangedListener(new IConfigurationChangedListener() {
			public void notifyConfigurationChanged(Object arg) {
				notifyDataSetChanged();
			}			
		});
		this.backend.getConfigurationManager().registerStockTickFrequencyChangedListener(new IConfigurationChangedListener() {
			public void notifyConfigurationChanged(Object arg) {
				notifyDataSetChanged();
			}			
		});
	}
	
	public int getCount() {
		return 1;
	}

	public Object getItem(int arg0) {
		return null;
	}

	public long getItemId(int position) {
		return position;
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		return null;
	}
}
